package com.springbootstart;

import org.springframework.web.WebApplicationInitializer;

import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletRegistration;

public class MyInit extends MyServlet implements WebApplicationInitializer {
    @Override
    public void onStartup(ServletContext servletContext) throws ServletException {
        ServletRegistration.Dynamic app = servletContext.addServlet("app", getServlet());
        app.setLoadOnStartup(1);
        app.addMapping("/");
    }
}
